<div style="font-weight: bold; font-size: 20px; margin-top: 20px"> ${serialNumber}、景区用户数TOP5 </div>
<div id="focus-area-scenic-top5-desc" style="text-indent: 2em;font-size:20px;margin-top: 20px;line-height: 35px;">
    <!-- 选取关注区域为景区类型的区域，统计本周累计用户数，用户数量从多到少排行前5的区域如下图所示，区域1累计用户数量为x万，排名第一，其次是区域2，累计用户数量共x万，区域3排名第三，累计用户数量为x万。-->
</div>
<div id="myecharts2" style="width: 1000px; height: 400px; margin: 0 auto; margin-top: 20px"></div>

<script>
    (function () {

        $(document).ready(function () {
            // 二、景区用户数TOP5
            /*var areaData = [{"areaId":"1228","areaName":"三亚凤凰岭海誓山盟景区","areaType":"3","cityId":"2","count":11935,"latitude":"18.310069496753517","longtitude":"109.44931807836515","taskId":"661"},{"areaId":"1276","areaName":"观澜湖旅游度假区","areaType":"3","cityId":"1","count":4833,"latitude":"20.02944174966439","longtitude":"110.3305504021421","taskId":"628"},{"areaId":"1234","areaName":"亚龙湾热带天堂森林旅游区","areaType":"3","cityId":"2","count":3890,"latitude":"18.310069496753517","longtitude":"109.44931807836515","taskId":"639"},{"areaId":"1125","areaName":"骑楼老街","areaType":"3","cityId":"1","count":3768,"latitude":"20.02944174966439","longtitude":"110.3305504021421","taskId":"660"},{"areaId":"1001","areaName":"呀诺达热带雨林","areaType":"3","cityId":"18","count":3503,"latitude":"18.67180545889963","longtitude":"109.69885590528405","taskId":"500"}]*/
            var areaData = ${focusAreaScenicTop5}
            var myecharts2 = echarts.init(document.getElementById("myecharts2"));
            var barXAxisData = $.map(areaData, function(n, i){ return n.areaName });
            var countValues = $.map(areaData, function(n, i){ return n.count });
            var optionBar1 = {
                title: {
                    text: "景区用户数TOP5",
                },
                tooltip: {
                    trigger: "axis",
                    axisPointer: {
                        type: "shadow",
                    },
                },
                color: ['#4b91ff'],
                legend: false,
                grid: {
                    left: "3%",
                    right: "4%",
                    bottom: "3%",
                    containLabel: true,
                },
                xAxis: {
                    type: "category",
                    data: barXAxisData,
                },
                yAxis: {
                    type: "value",
                    boundaryGap: [0, 0.01],
                    axisLabel: {
                        fontSize: 14,
                        show: true,
                        formatter: function(params) {
                            console.log(params)
                            var result = ''
                            result = params / 10000
                            if (params > 1000) {
                                return result + '万'
                            } else {
                                return params
                            }
                        },
                    },
                },
                series: [
                    {
                        type: "bar",
                        data: countValues
                    }
                ]
            }
            myecharts2.setOption(optionBar1);
            $("#focus-area-scenic-top5-desc").text("${focusAreaScenicTop5Desc}");
        })
    })()
</script>